<extend name="Public/base"/>
<block name="head">
    <link rel="stylesheet" href="__PUBLIC__/dist/css/bootstrapValidator.css"/>
    <link href="__PUBLIC__/dist/css/default.css" rel="stylesheet" type="text/css" />
</block>
<block name="body">
    <section class="content">

        <h4 class="modal-title" >
            编辑Api信息
        </h4>

        <form role="form" action="__URL__/update" method="post" id="ApiForm" >
        <div class="box-body">
			<div class="form-group">
				<label>API名称</label>
				<input type="text" class="required form-control"  name="name" value="{$vo.name}">
				<input type="hidden" name="id" value="{$vo.id}" >
			</div>
			<div class="form-group">
				<label>API地址</label>
				<input type="text" class="required form-control"   name="api_address" value="{$vo.api_address}">
			</div>
			<div class="form-group">
				<label>API KEY</label>
				<input type="text" class="required form-control"   name="api_key" value="{$vo.api_key}">
			</div>
			<div class="form-group">
				<label>API 密码</label>
				<input type="text" class="required form-control"   name="api_pwd" value="{$vo.api_pwd}">
			</div>
			<div class="form-group">
                <label>API Account</label>
                <input type="text" class=" form-control"   name="account" value="{$vo.account}" />
            </div>
            <div class="form-group">
                <label>API Token</label>
                <input type="text" class=" form-control"   name="api_token" value="{$vo.api_token}" />
            </div>
			<div class="form-group">
				<label>API平台</label>
				<select name="platform" id="platform" class="combox " >
					{$Think.config.platform|renderOptions=$vo['platform']}
				</select>
			</div>
			<div class="form-group">
				<label>状态：</label>
				<select name="status">
					<option value="1" <?php if($vo['status']): ?>selected<?php endif; ?>>启用</option>
					<option value="0" <?php if(!$vo['status']): ?>selected<?php endif; ?>>禁用</option>
				</select>
			</div>
        </div>
		<div class="box-footer">
               <button type="submit" class="btn btn-primary">Submit</button>
         </div>
    </form>
     </section>
 </block>


<block name="script">
    <script src="__PUBLIC__/dist/js/bootstrapValidator.js" type="text/javascript"></script>
    <script src="__PUBLIC__/dist/js/language/zh_CN.js" type="text/javascript"></script>
    <script src="__PUBLIC__/dist/js/validator.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            Validator('ApiForm');
            iniAjaxFormDetail('#ApiForm','__URL__/index/pid/1/');
        });
    </script>
</block>
